FROM sanbuliuxin/workspace-base:v1

RUN wget https://mirrors.huaweicloud.com/java/jdk/8u151-b12/jdk-8u151-linux-x64.tar.gz && \
    tar -zxvf jdk-8u151-linux-x64.tar.gz -C /opt && \
    mv /opt/jdk1.8.0_151 /opt/jdk && \
    rm -rf jdk-8u151-linux-x64.tar.gz


ENV JAVA_HOME /opt/jdk
ENV PATH $PATH:$JAVA_HOME/bin

RUN env | egrep -v "^(HOME=|USER=|MAIL=|LC_ALL=|LS_COLORS=|LANG=|HOSTNAME=|PWD=|TERM=|SHLVL=|LANGUAGE=|_=)" >> /etc/environment
RUN echo "source /etc/environment" >> /etc/profile